home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1991 …esperately Seeking Seven / Desperately Seeking Seven.2mg / Dev.CD.8 / Essentials / Tools / File.Type.Notes / FTN.BB.XXXX < prev    next >
Encoding:
Text File  |  1989-10-08  |  8.5 KB  |  180 lines  |  [04] ASCII Text (0x0000)

  1. Apple II
  2. File Type Notes
  3. _____________________________________________________________________________
  4.                                                   Developer Technical Support
  5.  
  6.  
  7. File Type:         $BB (187)
  8. Auxiliary Type:    All
  9.  
  10. Full Name:     Apple IIGS Device Driver File
  11. Short Name:    Device driver
  12.  
  13. Written by:    Matt Deatherage                                  November 1989
  14.  
  15. Files of this type and all auxiliary types contain Apple IIGS device drivers.
  16. _____________________________________________________________________________
  17.  
  18. An Apple IIGS device driver is defined as code that is necessary to control or 
  19. operate a peripheral in a desired manner.  A driver file's data fork contains 
  20. code (in Object Module Format) that can be loaded by the System Loader or 
  21. ExpressLoad and executed.
  22.  
  23. The format of a driver file depends largely upon the auxiliary type of the 
  24. driver.  Each driver has a class and an inactive flag in the auxiliary 
  25. type, as Figure 1 indicates.
  26.  
  27.  _______________________________________________________________
  28. | F | E | D | C | B | A | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
  29. |___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|___|
  30.  \_/ \_________________________/ \_____________________________/
  31.   |               |                             |
  32.   |               |                             |
  33.   |               |                             |___ Driver-specific
  34.   |               |                                  classifications
  35.   |               |
  36.   |               |_________________________________ Driver class
  37.   |
  38.   |_________________________________________________ 1 = inactive, 0 = active
  39.  
  40.                       Figure 1-Auxiliary Type Definition
  41.  
  42. If bit 15 of the auxiliary type is set, the driver is considered inactive and 
  43. should not be used.  If the bit is clear, the driver is considered active and 
  44. may be used if desired.  Users may inactivate drivers from the Finder and are 
  45. likely to be confused if a driver they marked as inactive continues to appear.
  46.  
  47. Bits 14 through 8 determine the driver's class.  This mechanism allows many 
  48. types of device drivers to share the same OMF-compatible file type.  Table 1 
  49. lists defined classes of drivers.
  50.  
  51.                   Class       Definition
  52.                   _________________________________________
  53.                   $00         Print Manager driver
  54.                   $01         GS/OS driver
  55.                   $02         AppleTalk driver
  56.                   $03         MIDI Tools driver
  57.                   $04--$7E    Reserved
  58.                   $7F         Third-party multimedia driver
  59.                   _________________________________________
  60.  
  61.                          Table 1-Driver Classes
  62.  
  63. The low byte of the auxiliary type (bits 7 through 0) is referred to as the 
  64. subclass, and it depends upon the driver class for interpretation.  Below are 
  65. the interpretations for the defined driver classes.
  66.  
  67. Print Manager Drivers
  68.  
  69. For class $00, the low byte determines the kind of Print Manager driver is 
  70. contained in the file.  A subclass of $00 indicates a printer driver, a 
  71. subclass of $01 indicates a directly-connected port driver, and a subclass of 
  72. $02 indicates a network port driver.  All other values in the subclass for 
  73. Print Manager drivers are reserved.
  74.  
  75. Printer and Port Drivers are documented in Apple IIGS Technical Note #35, 
  76. Printer Driver Specifications and in Apple IIGS Technical Note #36, Port 
  77. Driver Specifications.
  78.  
  79. GS/OS Drivers
  80.  
  81. GS/OS drivers are class $01.  GS/OS groups the subclass into two fields.  Bits 
  82. 7 and 6 indicate the GS/OS driver type.  A value of 00 indicates a standard 
  83. GS/OS device driver.  A value of 01 indicates a GS/OS Supervisor driver.  A 
  84. value of 10 indicates a GS/OS "boot driver," a GS/OS driver which is loaded 
  85. before other GS/OS drivers to control the boot device.  For further 
  86. information on boot drivers, contact Developer Technical Support.  A value of 
  87. 11 is reserved and must not be used by GS/OS device driver authors.
  88.  
  89. Bits 5 through 0 are defined by the GS/OS driver type.  For standard device 
  90. drivers, this field indicates the maximum number of devices supported; the 
  91. GS/OS Device Dispatcher will use this field to allocate memory when the driver 
  92. is loaded.  For all other GS/OS driver types, this field is reserved and 
  93. must not be used by GS/OS driver authors.
  94.  
  95. GS/OS driver definitions are documented in GS/OS Reference, Volume 2.
  96.  
  97. AppleTalk Drivers
  98.  
  99. The subclass is used by AppleTalk to determine in which order the drivers 
  100. should be loaded.  Programmers should treat every AppleTalk driver (all 
  101. subclasses) as reserved; do not change the auxiliary type in any way, not 
  102. even to deactivate the drivers.
  103.  
  104. Class $02 drivers are AppleTalk protocol drivers, including ROM patches for 
  105. AppleTalk firmware.  These drivers are currently loaded and initialized by the 
  106. SCC.Manager supervisor driver.
  107.  
  108. Note: The SCC.Manager driver must not be deactivated as it 
  109.       arbitrates use of the serial ports.  It is required for AppleTalk 
  110.       to function.  Similarly, the AppleTalk drivers must not be 
  111.       deactivated individually or AppleTalk may not be initialized 
  112.       correctly.  Disable AppleTalk in the Control Panel.  You may then 
  113.       use the Apple IIGS Installer to remove AppleShare if you wish to 
  114.       remove AppleTalk drivers and protocols from a disk.
  115.  
  116. AppleTalk drivers are loaded only if AppleTalk is enabled in the Control 
  117. Panel.  The drivers are initialized in alphabetical order; therefore, you 
  118. should not change the names of existing AppleTalk drivers.
  119.  
  120. In the driver subclass, bit 7 indicates whether the flag is a standard 
  121. AppleTalk protocol.  For protocols that you write and ship, this bit must be 
  122. set to 1.  If you feel your driver should have this bit set as a standard 
  123. protocol, contact Developer Technical Support.  Bits 0-3 of the subclass 
  124. indicate the maximum ROM version for which the driver should be loaded.  For 
  125. example, a driver with a value of 1 in this field will not be loaded on a 
  126. machine with a ROM version greater than 1.  A driver with a value of 3 will 
  127. not be loaded on future Apple IIGS machines, but will be loaded on all current 
  128. machines.
  129.  
  130. AppleTalk drivers are called to initialize themselves in full 16-bit native 
  131. mode.  The A register contains the current AppleTalk channel number (i.e., 
  132. which port is being used for AppleTalk); the X register contains the ROM 
  133. version; the Y register contains the AppleTalk firmware slot number.  Drivers 
  134. should return from initialization with the carry clear and zero in the 
  135. accumulator if initialization was successful or carry set and an error code in 
  136. A if initialization failed.  You may assume that AppleTalk is active during 
  137. AppleTalk driver initialization.  Your driver should perform necessary 
  138. installation tasks (such as opening as socket or adding routines to the 
  139. dispatch table at $E1D600) during initialization.
  140.  
  141. The remaining bits in the driver subclass are reserved and must not be used 
  142. by AppleTalk driver authors.
  143.  
  144. MIDI Tools Drivers
  145.  
  146. The subclass field for MIDI Tools drivers is currently reserved and should 
  147. be set to zero.  MIDI Tools Drivers are documented in Apple IIGS Technical 
  148. Note #54, MIDI Drivers.
  149.  
  150. Third-Party Multimedia Drivers
  151.  
  152. The third-party multimedia driver class indicates drivers used by applications 
  153. or other non-system components to control multimedia peripherals such as 
  154. videodisc or video tape players.  The subclass for this class is assigned 
  155. for each driver by Developer Technical Support, as are most file type and 
  156. auxiliary type combinations.  Developers wishing to provide a multimedia 
  157. driver must contact Developer Technical Support for a subclass assignment.
  158.  
  159. What's Reserved?
  160.  
  161. Since so many types of drivers are all using the same file type, it is 
  162. essential that you adhere to the auxiliary type conventions specified in 
  163. this Note.  If you are creating a driver whose auxiliary type can not be 
  164. completely defined using the guidelines in this Note, contact Developer 
  165. Technical Support for assistance, or for further assignment.  If you are 
  166. creating a driver which does not fit into an existing driver class, contact 
  167. Developer Technical Support for a new class assignment.
  168.  
  169. Do not use any field marked as reserved in this Note to store any number 
  170. other than zero.
  171.  
  172.  
  173. Further Reference
  174. _____________________________________________________________________________
  175.     o    Apple IIGS Toolbox Reference
  176.     o    GS/OS Reference, Volume 2
  177.     o    Apple IIGS Technical Note #35, Printer Driver Specifications
  178.     o    Apple IIGS Technical Note #36, Port Driver Specifications
  179.     o    Apple IIGS Technical Note #54, MIDI Drivers
  180.